﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using e77.MeasureBase.Helpers;

namespace e77.Ud2
{
    public enum EGains
    {
        Unit = 0, // 1x gain
        Double = 1, // 2x gain
        Quadruple = 2, // 4x gain
        OverLit = 3 // Overlit channel
    }

    public enum E2Channels
    {
        Ch1 = 0,
        Ch2
    }

    public enum EAllChannels
    {
        Ch1 = 0,
        Ch2,
        LED
    }

    public enum EColors
    {
        green = 0,
        cyan = 1,
        orange = 2,
        red = 3
    }

    public enum ELightness
    {
        lit, dark
    }

    static public class DeviceEnumHelper
    {
        public static HeadEnums.ELedMask toLedMask(this EColors color)
        {
            switch (color)
            {
                case EColors.green:
                    return HeadEnums.ELedMask.green;
                case EColors.cyan:
                    return HeadEnums.ELedMask.cyan;
                case EColors.orange:
                    return HeadEnums.ELedMask.orange;
                case EColors.red:
                    return HeadEnums.ELedMask.red;
                default:
                    throw new NotImplementedException();
            }
        }

        //readonly static public List<EColors> ListOfColors = EnumHelper.GetValues<EColors>();
        //readonly static public int NumberOfColors = ListOfColors.Count;

        //readonly static public List<E2Channels> ListOf2Channels = EnumHelper.GetValues<E2Channels>();
        //readonly static public int NumberOf2Channels = ListOf2Channels.Count;

        //readonly static public List<EAllChannels> ListOfAllChannels = EnumHelper.GetValues<EAllChannels>();
        //readonly static public int NumberOfAllChannels = ListOfAllChannels.Count;

        //readonly static public List<EGains> ListOfGains = EnumHelper.GetValues<EGains>();
        //readonly static public int NumberOfGains = ListOfGains.Count;

        //readonly static public List<ELightness> ListOfLightness = EnumHelper.GetValues<ELightness>();
        //readonly static public int NumberOfLightness = ListOfLightness.Count;

        //readonly static public int LED_NUMBER = Enum.GetNames(typeof(EColors)).Length;
        //readonly static public int ALL_CHANELLS_NUMBER = Enum.GetNames(typeof(EAllChannels)).Length;
        //readonly static public int TWO_CHANELLS_NUMBER = Enum.GetNames(typeof(E2Channels)).Length;
    }
}